import request from '@/utils/request'

// 获取列表数据的方法
export const getSubjectList = params => {
  return request({
    url: '/subject/list',
    params: params
  })
}

// 更改状态
export const changeStatus = id => {
  return request({
    url: '/subject/status',
    method: 'POST',
    data: {
      id
    }
  })
}

// 删除
export const delSubject = id => {
  return request({
    url: '/subject/remove',
    method: 'POST',
    data: {
      id
    }
  })
}

// 新增
export const addSubject = data => {
  return request({
    url: '/subject/add',
    method: 'POST',
    data
  })
}

// 修改
export const updateSubject = data => {
  return request({
    url: '/subject/edit',
    method: 'POST',
    data
  })
}
